package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.*;

/*******************************************************************************
 *
 *        @author Brady White
 *          Date: Mar 3, 2009
 *   Description: Service Task
 * Last Revision: Mar 3, 2009
 *
 ******************************************************************************/
public class Task extends BusinessObject {

    private String description = null;

    /** Creates a new instance of the BO */
    public Task(String id) {
        super(id);
    }

    /** Convenience method to call the correct DAO to save this business object */
    public void save() throws DataException {
        try {
            TaskDAO.getInstance().save(this);
        } catch (DataException e) {
            e.printStackTrace();
        }
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
        this.setDirty(true);
    }

    @Override
    public String toString(){
        return description;
    }
}//class